<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>班级管理系统</title>
    {% load static %}
    <link rel="stylesheet" href="{% static 'css/index.css' %}">
</head>
<body>
<h3>班级管理主页</h3>
<form action="{% url 'classmate:search_student' %}" method="get" id="searchForm">
    <input type="text" name="name" id="name" placeholder="请输入学生姓名">
    <input type="submit" value="查询">
</form>
<ul id="menu">
    <li><a href="{% url 'classmate:add_student' %}">添加学生</a></li>
    <li><a href="{% url 'classmate:add_class' %}">添加班级</a></li>
    <li><a href="{% url 'classmate:class_list' %}">查看班级</a></li>
</ul>
<h3>学生列表</h3>
{% if students %}
<ul>
    {% for student in students %}
    <li>
        <a href="{% url 'classmate:detail' student.id %}">{{ forloop.counter }}、{{ student.name }}</a>
    </li>
    {% endfor %}
</ul>
{% else %}
<p>暂无学生信息</p>
{% endif %}
</body>
</html>